package com.youchuang.action.user;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;

import com.opensymphony.xwork2.ActionSupport;
import com.youchuang.action.BaseAction;
import com.youchuang.bean.User;
import com.youchuang.common.Constant;

/**
 * 跳转修改用户信息
 * 
 * @author Administrator
 *
 */
@Namespace(value = "/user")
@ParentPackage("shopping-default")
public class ToUpdateUserAction extends BaseAction {
	private Logger logger = Logger.getLogger(ToUpdateUserAction.class.getSimpleName());
	private User user;

	@Action(value = "toUpdateUser", results = {
			@Result(name = ActionSupport.SUCCESS, location = "/WEB-INF/jsp/user/update_user.jsp") })
	public String execute() throws Exception {
		// TODO:这过程有无用，需要修改
		logger.info("excertion is execute");
		user = (User) session.get(Constant.S_USER);
		return Constant.SUCCESS;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}
